<template>
  <van-space
    direction="vertical"
    :size="20"
    fill
  >
    <view class="app-tree__container">
      <AppTree
        v-model="current"
        :data="data"
      />
    </view>
    <van-divider>数据</van-divider>
  </van-space>
</template>

<script setup lang="ts">
import createData from '@/utils/tree'
import type { AppTreeData } from '@/components/AppTree/types'

const current = ref('')
const data = ref<AppTreeData[]>(createData(3, 10, 20))
</script>

<style lang="scss" scoped>
.app-tree__container {
  max-height: 40vh;
  overflow-y: auto;
}
</style>
